package logic.SysOrganizationalRole

import cn.ibizlab.util.domain.EntityBase
import cn.ibizlab.util.helper.RuleUtils
import cn.ibizlab.util.security.AuthenticationUser
import cn.ibizlab.util.security.SpringContextHolder
import cn.ibizlab.core.ad.domain.SysOrganizationalRole
import cn.ibizlab.core.ad.service.SysOrganizationalRoleService
import com.alibaba.fastjson.JSONObject
import org.springframework.util.ObjectUtils

/**
 *  删除成员
 */
class RemoveMember {

    //当前用户
    def curuser = AuthenticationUser.getAuthenticationUser()
    //传入变量
    def _default
    //返回参数
    def _return

    def execute(arg) {
        println 'running....'
        _default = arg
        _return = arg
        begin()
        println 'running end....'
        return _return
    }

    //开始
    def begin() {
    
        //连接名称
        if(true) {
            rawsqlcall1()
        }
    }

    //删除组对应的系统角色成员
    def rawsqlcall1() {
        Map param =new HashMap();
        param.put("param0",_default.get("id"));
        String strSql="""
    delete from SYS_ROLE_MEMBER where member_type = 'organizationalRole' and member_uid = #{et.param0}
        """
        SpringContextHolder.getBean(SysOrganizationalRoleService.class).select(strSql,param)

        if(true) {
            end1()
        }
    }

    //结束
    def end1() {

    }

}
